Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Z9100 to check SFP Presence, toggling lpmode, reset… #1087

Merged
merged 3 commits into from
Oct 31, 2017
Merged

Added support for Z9100 to check SFP Presence, toggling lpmode, reset… #1087

merged 3 commits into from
Oct 31, 2017

Conversation

paavaanan
Copy link
Contributor

Added support for Z9100 to check SFP Presence, toggling lpmode, reset and eeprom details

- What I did
Added support for Z9100 to check SFP Presence, toggling lpmode, reset and eeprom details

- How I did it

  • get_presence, get_low_power_mode, set_low_power_mode, reset ---> Z9100 consist of 32 ports modules where the i2c path starts with 14,16,15. Added support in "i2c to port" match for qsfp_path selection.

  • Eagle Port support is currently not included.

- How to verify it

  • Use all possible options in sfputil - eeprom, lpmode, presence, reset.

- Description for the changelog

unit_test_eeprom.txt
unit_test_lpmode.txt
unit_test_presence.txt

- A picture of a cute animal (not mandatory but encouraged)

@lguohan
Copy link
Collaborator

lguohan commented Oct 27, 2017

retest this please

1 similar comment
@lguohan
Copy link
Collaborator

lguohan commented Oct 27, 2017

retest this please

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are quite a few inconsistencies in style. Please run this script through http://pep8online.com and fix all reported style issues in order to create consistent Python style.

@@ -1,60 +1,329 @@
#!/usr/bin/env python
#!/usr/bin/python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shebang can be removed altogether, as this file is a plugin, and is not executable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.. Thanks for the catch..

# Rationalize port settings
if port_num >= self.iom2_port_start and port_num <= self.iom2_port_end:
port_num = port_num % 12
elif port_num >= self.iom3_port_start and port_num <= self.iom3_port_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

i2c_line = 14
elif port_num >= self.iom2_port_start and port_num <= self.iom2_port_end:
i2c_line = 15
elif port_num >= self.iom3_port_start and port_num <= self.iom3_port_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

# Rationalize port settings
if port_num >= self.iom2_port_start and port_num <= self.iom2_port_end:
port_num = port_num % 12
elif port_num >= self.iom3_port_start and port_num <= self.iom3_port_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

i2c_line = 14
elif port_num >= self.iom2_port_start and port_num <= self.iom2_port_end:
i2c_line = 15
elif port_num >= self.iom3_port_start and port_num <= self.iom3_port_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

# Rationalize port settings
if port_num >= self.iom2_port_start and port_num <= self.iom2_port_end:
port_num = port_num % 12
elif port_num >= self.iom3_port_start and port_num <= self.iom3_port_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

i2c_line = 14
elif port_num >= self.iom2_port_start and port_num <= self.iom2_port_end:
i2c_line = 15
elif port_num >= self.iom3_port_start and port_num <= self.iom3_port_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

# Rationalize port settings
if port_num >= self.iom2_port_start and port_num <= self.iom2_port_end:
port_num = port_num % 12
elif port_num >= self.iom3_port_start and port_num <= self.iom3_port_end:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

time.sleep(1)

# Flip the bit back high and write back to the register to take
# port out of reset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace tab with 4 spaces.

Copy link
Contributor Author

@paavaanan paavaanan Oct 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Joe,
prep8online is really nice to catch the errors. Initially I face some confusion due to syntax errors. But, easy to align. Now, I checked-in with all changes. Please, have a look on it.

So, now for each *.py file commit do build system check for alignment issues?

9: [8, 27],
10: [8, 28],
11: [8, 29],
12: [8, 31], #reordered
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add extra space before inline comment (pep8 style asks for minimum two spaces before the inline comment begins), and add space between # and reordered.

Also remove trailing whitespace.

11: [8, 29],
12: [8, 31], #reordered
13: [8, 30],
14: [8, 33], #reordered
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add extra space before inline comment (pep8 style asks for minimum two spaces before the inline comment begins), and add space between # and reordered.

@jleveque jleveque merged commit bfa0346 into sonic-net:master Oct 31, 2017
@paavaanan paavaanan deleted the sonic_z9100_sfpuitil_build branch November 1, 2017 09:07
@paavaanan paavaanan restored the sonic_z9100_sfpuitil_build branch November 1, 2017 09:07
lguohan pushed a commit that referenced this pull request Oct 20, 2019
Sonic-swss-common:

aaa8133 - 2019-10-12 : Add VRF object table in state_db (#312) [Tyler Li]
91aceb1 - 2019-10-11 : [schema] Update schema to support debug counters (#308) [Danny Allen]
9bcd5ca - 2019-09-28 : [multi-DB] fix vs test, should NOT replace old DBConnector API with new DBConnector API since vs test docker has no database_config.josn (#311) [Dong Zhang]
599155a - 2019-09-25 : [multi-DB] Part 2: C++ interface API changes / swsscommon unit test / LOGLEVEL_DB apply new API (#301) [Dong Zhang]
379ac73 - 2019-09-20 : add bulkremove for consumer_table_pops.lua (#306) [Dong Zhang]
6b805d3 - 2019-09-19 : timerfd return 0 with errno =0 - handle as False alarm. (#302) [Renuka Manavalan]
e455891 - 2019-09-03 : Add VLAN_SUB_INTERFACE in CONFIG_DB schema (#284) [Wenda Ni]

Sonic-swss

731a8f5 - 2019-10-17 : [copporch]: fix the endless loop problem when removing copp table group. (#1038) [wangshengjun]
1623219 - 2019-10-14 : Enable C++ unit test during build (#1092) [Qi Luo]
629c9d3 - 2019-10-14 : [vstest]: Revert back to 2 sec, and check if we got more than expected number of syslogs (#1091) [Prince Sunny]
80b2ace - 2019-10-11 : sonic-swss/orchagent: Add new protocol trap name support (#1087) [jpxjlrldgit]
9f765f7 - 2019-10-11 : [aclorch]: Check for existing mirror table only when creating a new table (#1089) [Danny Allen]
4c10260 - 2019-10-11 : [vstest]: Update Route test to check for added entry (#1088) [Prince Sunny]
e658b64 - 2019-10-11 : [chassisorch]: Add everflow feature for chassis (#1024) [Ze Gan]
5b13387 - 2019-10-10 : [changelog]: Revert changelog that was done for passing VS test. (#1080) [Prince Sunny]
90a690d - 2019-10-10 : [aclorch]: Simplify the TCP flags matching code and support exact value match (#1072) [Shuotian Cheng]
3461710 - 2019-10-09 : Single VRF for ingress and egress flows, skip route replication (#1045) [Prince Sunny]
953474a - 2019-10-03 : [swss]: Do not use namespace in header files (#1081) [Wenda Ni]
bd36751 - 2019-10-03 : Change nexthop key to ip & ifname (#977) [tylerlinp]
fee1aaa - 2019-10-02 : [teamsyncd]: Check if LAG exists before removing (#1069) [Shuotian Cheng]
175f3de - 2019-09-30 : Update ECMP NHopGroup for Port Channel oper down (#1030) [Sumukha Tumkur Vani]
182940d - 2019-09-26 : [mirrororch]: Remove mirror session state after it is remvoed (#1066) [Shuotian Cheng]
d823dd1 - 2019-09-20 : [MirrorOrch]: Mirror Session Retention across Warm Reboot (#1054) [Shuotian Cheng]
a5b6e7c - 2019-09-19 : Ignore link local neighbors (#1065) [Prince Sunny]
0ddaba3 - 2019-09-19 : Adopt to signature change of Selectable::readData, which switched (#1061) [Renuka Manavalan]
543bd98 - 2019-09-18 : [aclorch]: Fix table name in counter table for mirror rules (#1060) [Shuotian Cheng]
12c29b4 - 2019-09-19 : Cannot ping to link-local ipv6 interface address of the switch. (#774) [Kiran Kumar Kella]
4d8e08d - 2019-09-18 : change in fpmsyncd to skip the lookup for the Master device name if the route object table value is zero (#1048) [Arvindsrinivasan Lakshmi narasimhan]
da514f5 - 2019-09-18 : Do not update lag mtu from teamsyncd (netlink) (#1053) [Prince Sunny]
3fb22e1 - 2019-09-16 : Check warmboot flag during initialization (#1057) [Prince Sunny]
d98d1e9 - 2019-09-16 : [aclorch]: Egress mirror action support and action ASIC support check (#963) [Stepan Blyshchak]
313ef5c - 2019-09-09 : Warmboot Vlan neigh restore fix (#1040) [Prince Sunny]
5841e06 - 2019-09-06 : Add dot1p to tc mapping support (#871) [Wenda Ni]
39fe568 - 2019-08-30 : [aclorch]: Revise ACL rule creation/removal logs (#1042) [Shuotian Cheng]
c461911 - 2019-08-27 : [copporch]: Fix the typo - mld_v1_done (#1037) [wangshengjun]
34915de - 2019-08-22 : [portsyncd]: Add default catch block in portsyncd (#1033) [SuvarnaMeenakshi]
dc81a21 - 2019-08-20 : [vnet]: Fix FDB related failure in "vnet_bitmap" virtual switch test (#1034) [Volodymyr Samotiy]
5ae4226 - 2019-08-19 : [test]: Adjust stale timer for warm-reboot neighborsync test cases (#1031) [zhenggen-xu]
65cbd55 - 2019-08-16 : [build]: Fix compiling warnings using ARM 32 bit compiler (#1015) [arheneus@marvell.com]
b611808 - 2019-08-16 : [Orchagent]: Fixbug segmentfault at routeorch (#1025) [Ze Gan]
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this pull request Mar 23, 2020
abdosi added a commit that referenced this pull request Sep 19, 2020
Revert "Revert " [201911]show interface counters for multi ASIC devices
(#1104)""
 Revert "Revert "Pfcstat (#1097)""
  [show] Fix 'show int neighbor expected' (#1106)
   Update argument for docker exec it->i (#1118)
     Update to make config load/reload backward compatible. (#1115)
     Handling deletion of Port Channel before deletion of its members
     (#1062)
    Skip default route present in ASIC-DB but not in APP-DB. (#1107)
     [CLI][PFCWD][Multi-ASIC] Added multi ASIC support to 'pfcwd' CLI
     (#1102)
       [201911]  Multi asic platform config interface portchannel, show
       transceiver  (#1087)
       [drop counters] Fix configuration for counters with lowercase
       names (#1103)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this pull request Jul 22, 2022
Update recording file if not start recording was performed previously
yxieca added a commit to yxieca/sonic-buildimage that referenced this pull request Jul 22, 2022
… advance submodule head

sairedis:
* 38c0bb1 2022-07-21 | [sairedis] Fix reopen recoding file (sonic-net#1087) (HEAD -> 202205, github/202205) [Kamil Cudnik]

platform-daemon:
* 17587b6 2022-07-22 | [ycabled] add secure channel support for grpc dualtor active-active connectivity  (sonic-net#275) (HEAD -> 202205, github/202205) [vdahiya12]

linkmgrd:
* c911ec7 2022-07-21 | Avoid unnecessary error logs from `handleGetServerMacAddressNotification` (sonic-net#96) (HEAD -> 202205) [Jing Zhang]
* bbae81d 2022-07-18 | Add support for reconciliation after warm restart  (sonic-net#76) [Jing Zhang]

utilities:
* bcc1206 2022-07-20 | Change db_migrator major version on master branch from version 2 to 3 (sonic-net#2272) (HEAD -> 202205) [Vaibhav Hemant Dixit]
* ad40697 2022-07-21 | Fix test for pfcwd_sw_enable in db_migrator_test (sonic-net#2253) [bingwang-ms]
* 886f612 2022-07-22 | Revert "show commands for SYSTEM READY (sonic-net#1851) (sonic-net#2261)" (sonic-net#2274) (github/202205) [Ying Xie]
* a6404b7 2022-07-17 | show commands for SYSTEM READY (sonic-net#1851) (sonic-net#2261) [Senthil Kumar Guruswamy]

swss-common:
* 509b265 2022-07-06 | Add device global table definition (sonic-net#645) (HEAD -> 202205) [tjchadaga]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
yxieca added a commit that referenced this pull request Jul 23, 2022
… advance submodule head (#11518)

sairedis:
* 38c0bb1 2022-07-21 | [sairedis] Fix reopen recoding file (#1087) (HEAD -> 202205, github/202205) [Kamil Cudnik]

platform-daemon:
* 17587b6 2022-07-22 | [ycabled] add secure channel support for grpc dualtor active-active connectivity  (#275) (HEAD -> 202205, github/202205) [vdahiya12]

linkmgrd:
* c911ec7 2022-07-21 | Avoid unnecessary error logs from `handleGetServerMacAddressNotification` (#96) (HEAD -> 202205) [Jing Zhang]
* bbae81d 2022-07-18 | Add support for reconciliation after warm restart  (#76) [Jing Zhang]

utilities:
* bcc1206 2022-07-20 | Change db_migrator major version on master branch from version 2 to 3 (#2272) (HEAD -> 202205) [Vaibhav Hemant Dixit]
* ad40697 2022-07-21 | Fix test for pfcwd_sw_enable in db_migrator_test (#2253) [bingwang-ms]
* 886f612 2022-07-22 | Revert "show commands for SYSTEM READY (#1851) (#2261)" (#2274) (github/202205) [Ying Xie]
* a6404b7 2022-07-17 | show commands for SYSTEM READY (#1851) (#2261) [Senthil Kumar Guruswamy]

swss-common:
* 509b265 2022-07-06 | Add device global table definition (#645) (HEAD -> 202205) [tjchadaga]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
richardyu-ms added a commit to richardyu-ms/sonic-buildimage that referenced this pull request Jul 27, 2022
Upgrade submodule sairedis to take the fix for saithrift build
Upgrade SAI to latest for building in bullseye (sonic-net#1093)

involve other changes in sairedis:
[sairedis] Fix reopen recoding file (sonic-net#1087)
Update PN with XPN support (sonic-net#1081)
[syncd] Remove error message when tryTranslateVidToRid fails (sonic-net#1048)

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
@richardyu-ms richardyu-ms mentioned this pull request Jul 27, 2022
7 tasks
lguohan pushed a commit that referenced this pull request Jul 28, 2022
Upgrade submodule sairedis to take the fix for saithrift build
Upgrade SAI to latest for building in bullseye (#1093)

involve other changes in sairedis:
[sairedis] Fix reopen recoding file (#1087)
Update PN with XPN support (#1081)
[syncd] Remove error message when tryTranslateVidToRid fails (#1048)

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
skbarista pushed a commit to skbarista/sonic-buildimage that referenced this pull request Aug 17, 2022
… advance submodule head (sonic-net#11518)

sairedis:
* 38c0bb1 2022-07-21 | [sairedis] Fix reopen recoding file (sonic-net#1087) (HEAD -> 202205, github/202205) [Kamil Cudnik]

platform-daemon:
* 17587b6 2022-07-22 | [ycabled] add secure channel support for grpc dualtor active-active connectivity  (sonic-net#275) (HEAD -> 202205, github/202205) [vdahiya12]

linkmgrd:
* c911ec7 2022-07-21 | Avoid unnecessary error logs from `handleGetServerMacAddressNotification` (sonic-net#96) (HEAD -> 202205) [Jing Zhang]
* bbae81d 2022-07-18 | Add support for reconciliation after warm restart  (sonic-net#76) [Jing Zhang]

utilities:
* bcc1206 2022-07-20 | Change db_migrator major version on master branch from version 2 to 3 (sonic-net#2272) (HEAD -> 202205) [Vaibhav Hemant Dixit]
* ad40697 2022-07-21 | Fix test for pfcwd_sw_enable in db_migrator_test (sonic-net#2253) [bingwang-ms]
* 886f612 2022-07-22 | Revert "show commands for SYSTEM READY (sonic-net#1851) (sonic-net#2261)" (sonic-net#2274) (github/202205) [Ying Xie]
* a6404b7 2022-07-17 | show commands for SYSTEM READY (sonic-net#1851) (sonic-net#2261) [Senthil Kumar Guruswamy]

swss-common:
* 509b265 2022-07-06 | Add device global table definition (sonic-net#645) (HEAD -> 202205) [tjchadaga]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
saiarcot895 added a commit to saiarcot895/sonic-buildimage that referenced this pull request Aug 17, 2022
This brings in the following changes:

```
21f3d7c Add SAI_OBJECT_TYPE_TUNNEL object to break-before-make list (sonic-net#1075)
8ac3aa7 [sairedis] Fix reopen recoding file (sonic-net#1087)
0bbbb02 Transfer organization from Azure to sonic-net (sonic-net#1096)
3406c57 [sairedis] Perform log rotate on request (sonic-net#1083)
```

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
qiluo-msft pushed a commit that referenced this pull request Aug 18, 2022
This brings in the following changes:

```
21f3d7c Add SAI_OBJECT_TYPE_TUNNEL object to break-before-make list (#1075)
8ac3aa7 [sairedis] Fix reopen recoding file (#1087)
0bbbb02 Transfer organization from Azure to sonic-net (#1096)
3406c57 [sairedis] Perform log rotate on request (#1083)
```
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Sep 23, 2022
[submodule]: update sairedis (sonic-net#11545)

Upgrade submodule sairedis to take the fix for saithrift build
Upgrade SAI to latest for building in bullseye (sonic-net#1093)

involve other changes in sairedis:
[sairedis] Fix reopen recoding file (sonic-net#1087)
Update PN with XPN support (sonic-net#1081)
[syncd] Remove error message when tryTranslateVidToRid fails (sonic-net#1048)

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants